import ajax from '@/utils/ajax'


/**
 * 能+营销首页
 */

// 查询商户角色下所有油站
export const homePageBanners = params => ajax.post('/case/homePageBanners', params)

/**
 * 营销活动列表页
 */

// 查询商户角色下所有油站
export const getQueryGasList = params => ajax.post('gasInfo/getAllGasInfoList', params)

// 判断活动状态和顺序及是否购买过套餐包
export const beforeActiveList = params => ajax.post('/activity/beforeActiveList', params)

// 营销活动活动列表
export const getActiveList = params => ajax.post('/activity/activityListByType', params)

// 更新活动状态(除油站排序)
export const updateActiveState = params => ajax.post('/storeCoupon/updateActiveState', params)

// 下线油站排序
export const offline = params => ajax.post(`/gasRankConfig/offline`, params)

// 活动详情(除油站排序)
export const activeDetail = params => ajax.post('/activity/activeInfo', params)

// 修改活动名称
export const changeName = params => ajax.post('/activity/updateActiveName', params)

// 活动详情(油站排序)
export const orderDetail = params => ajax.post('/gasRankConfig/getDetail', params)

/**
 * 营销助手页面
 */

/**
 * 营销助手公共首页
 */

 //获取文案
export const getCaseTextApi = params => ajax.post('/activity/activeContent', params)

//获取短信/app及权益余额 
//gasId interestCode 权益codecoupon：店铺优惠券，callLossDriver：召唤流失司机司机，callRoundDriver：召唤周边司机
//codeBalance  查询的code权益数量   smsBalance  短信余额   pushBalance  push余额
export const getSurplusRightsApi = params => ajax.post('/storeCoupon/pushAndSmsAndCodeInterest', params)

//油站首页排序套餐
// gasId    result[]   customLocation 具体位置  interestCodeName 权益code num 剩余天数
export const getSurplusSortApi = params => ajax.post('/gasRankConfig/getSurplusDays', params)

// 营销助手列表
// export const marketHelperList = params => ajax.post('/interest/interestList', params)
export const marketHelperList = params => ajax.post('/interest/interestListV3', params)

// 一键召回流失司机
export const callGoneDriver = params => ajax.post('/callDriver/simpleCreateLossActive', params)

// 一键召唤流失司机
export const callAmbientDriver = params => ajax.post('/callDriver/simpleCreateNearbyActive', params)

// 获取用户名下所有油站
export const getAllGasInfoList = params => ajax.post('gasInfo/getAllGasInfoList', params)

// 获取活动效果页面字段数据
export const activityDetail = params => ajax.post('/activity/activityDetail', params)

// 获取活动效果页面echrtas数据
export const activeDataTrend = params => ajax.post('/orderDayReport/activeDataTrend', params)

// 是否可以一键召唤
export const canCreateActive = params => ajax.post('/callDriver/canCreateActive', params)

// 获取预计人数 传参字段 gasId， activeType 活动类型1：召唤周边司机，2：召回流失司机，3:店铺优惠券  5:会员关怀
export const predictUserNum = params => ajax.post('/callDriver/predictUserNum', params)

// 优惠券 返回字段说明:couponTitle：优惠券规则名称，expireDateInterval：限制天数，couponConditionMoney：使用门槛，couponMoney：优惠券金额
export const defaultCoupon = params => ajax.post('/storeCoupon/defaultCoupon', params)

/**
 * 油站排序配置页
 */
// 页面初始化，查询剩余天数
export const dateLast = params => ajax.post('/gasRankConfig/getSurplusDays', params)

// 查询已选择日期
export const getChoosedDate = params => ajax.post('/gasRankConfig/days', params)

// 新增油站排序
export const addOrder = params => ajax.post('/gasRankConfig/add', params)

// 油站排序修改反显
export const queryOrderById = params => ajax.post('/gasRankConfig/queryById', params)

// 修改排序
export const update = params => ajax.post('/gasRankConfig/update', params)

/**
 * 店铺优惠券
 */
//获取活动默认时间
export const getDefaultTimeApi = params => ajax.post('/storeCoupon/defaultActiveInfo', params)

//获取活动详情 params -> activeId
export const getCouponActiveDetailApi = params => ajax.post('/storeCoupon/queryStoreCouponActive', params)

//创建店铺优惠券活动
export const createCouponActiveApi = params => ajax.post('/storeCoupon/simpleCreateStoreActive', params)

//修改店铺优惠券活动
export const updateCouponActiveApi = params => ajax.post('/storeCoupon/updateStoreCouponActive', params)

//获取活动不可选择时间
export const disabledCouponDateApi = params => ajax.post('/storeCoupon/queryExistDate', params)


// 油款支付信息查询
export const oilPayInfo = params => ajax.post('/package/accountBalance', params)

// 油款确认支付
export const oilCashConfirm = params => ajax.post('/package/payByBalance', params)

// 是否支持油款支付
export const supportBalancePay = params => ajax.post('/package/supportBalancePay', params)

// 根据订单号获取订单详情
export const getOrderInfo = params => ajax.post('/package/getOrderInfo', params)

// 能+商城 套餐包下单支付
export const pay = params => ajax.post('/package/pay', params)

// 能+商城 套餐包订单状态轮循
export const pollingPayStatus = params => ajax.post('/package/pollingPayStatus', params)

// 能+商城 线下汇款信息获取
export const getBankAccount = params => ajax.post('/package/getBankAccount', params)

// 能+商城 下单购买套餐包
export const bookPackage = params => ajax.post('/package/bookPackage', params)
// 获取店铺券活动表单限制条件
export const getCouponLimitApi = params => ajax.post('/storeCoupon/couponLimit', params)

/**
 * 油站排序活动效果分析
 */
//获取曝光次数和访问次数
export const getSortEffectShowApi = params => ajax.post('/gasRankConfig/getConfigShowNums', params)

//获取活动期内的统计数据
export const getSortEffectSumApi = params => ajax.post('/gasRankConfig/getTotalData', params)

//获取该活动每天的活动数据
export const getSortEffectDayApi = params => ajax.post('/gasRankConfig/getDataByDay', params)

//获取活动的基本信息
export const getSortEffectInfoApi = params => ajax.post('/gasRankConfig/getConfigInfo', params)

// 查询营销基金
export const getMarketFund = params => ajax.post('/package/beforeOrder', params)

// 获取油款支付余额
export const accountDebtBalance = params => ajax.post('/package/accountDebtBalance', params)

/**
 * 会员关怀
 */

// 关怀类型
export const getCareTypeApi = params => ajax.post('/callDriver/vipCareType', params)

// 发起确认
export const confirmCareApi = params => ajax.post('/callDriver/canCreateActive', params)

//一键关怀
export const oneBtnCareApi = params => ajax.post('/callDriver/simpleCreateVipActive', params)

/**
 * 天天特价
 */
// 活动效果图表数据
export const specialPriceChart = params => ajax.post('/activity/dailyDataTrend', params)

// 活动建议
export const activeAdvice = params => ajax.post('/activity/activitySuggest', params)

// 控制数据分析是否展示 立即参与，立即购买按钮
export const showButton = params => ajax.post('/activity/showButton', params)
